//
//  HomeTableViewCell.m
//  YSZC
//
//  Created by 张斌 on 16/4/19.
//  Copyright © 2016年 YueShiKeJi. All rights reserved.
//

#import "HomeTableViewCell.h"
#import "UIView+CZFrame.h"

@implementation HomeTableViewCell

- (void)awakeFromNib {
    // Initialization code
    
    self.btn = [[UIButton alloc] init];
    [self.btn setBackgroundImage:[UIImage imageNamed:@"kongde"] forState:UIControlStateNormal];
    [self.btn setTitle:[NSString stringWithFormat:@"%.0f%%",self.progress.progress*100] forState:UIControlStateNormal];
    [self.btn setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
    self.btn.titleLabel.font = [UIFont systemFontOfSize:6];
    [self.contentView addSubview:self.btn];
    
    
}

- (void)layoutSubviews{
    [super layoutSubviews];
    
    [self.btn sizeToFit];
//    self.btn.frame = CGRectMake(self.progress.x+self.progress.w*self.progress.progress, self.progress.y-self.btn.h/2.1,100 ,100 );
    self.btn.frame = CGRectMake(self.progress.x+self.progress.w*self.progress.progress, self.progress.y-self.btn.h/2.1,self.btn.w*1.3,self.btn.h*1.3);
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
